import uuid

# 1.生成一个随机的UUID
random_uuid = uuid.uuid4()
print(random_uuid)

# 2.基于时间的UUID
time_based_uuid = uuid.uuid1()
print(time_based_uuid)

# 3.基于名字和命名空间的UUID
namespace = uuid.NAMESPACE_DNS
name = "example.com"
named_uuid = uuid.uuid3(namespace, name)
print(named_uuid)
